package com.example.iotlink.service;

import com.example.iotlink.bean.Receipt;

public class ReceiptStrategyContext {

    private ITopicHandleStrategy topicHandleStrategy;

    public void setTopicHandleStrategy(ITopicHandleStrategy topicHandleStrategy) {
        this.topicHandleStrategy = topicHandleStrategy;
    }

    public void handleReceipt(Receipt receipt){
        if (topicHandleStrategy != null){
            topicHandleStrategy.handelReceiveTopic(receipt);
        }
    }



}
